<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人资料 - 家族谱</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');
        body {
            font-family: 'Noto Sans SC', sans-serif;
        }
        .sidebar-item.active {
            background-color: rgba(255, 255, 255, 0.1);
            border-left: 4px solid #fff;
        }
        @media (max-width: 768px) {
            .sidebar {
                display: none;
            }
            .sidebar.show {
                display: block;
                position: fixed;
                top: 0;
                left: 0;
                width: 250px;
                height: 100vh;
                z-index: 50;
            }
        }
    </style>
</head>
<body class="bg-gray-100">
    <!-- 移动端顶部导航 -->
    <div class="md:hidden bg-white shadow-md py-3 px-4 flex justify-between items-center sticky top-0 z-10">
        <button id="menu-toggle" class="text-gray-700">
            <i class="fas fa-bars text-xl"></i>
        </button>
        <div class="text-center">
            <h1 class="text-xl font-bold text-gray-800">个人资料</h1>
        </div>
        <div>
            <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                 class="w-8 h-8 rounded-full" alt="用户头像">
        </div>
    </div>

    <div class="flex min-h-screen">
        <!-- 侧边栏 -->
        <div id="sidebar" class="sidebar bg-gray-800 text-white w-64 py-4 flex-shrink-0 hidden md:block">
            <div class="px-6 py-4">
                <h1 class="text-2xl font-bold">家族谱</h1>
                <p class="text-gray-400 text-sm">家族网站与家谱制作平台</p>
            </div>
            <div class="mt-6">
                <nav>
                    <a href="home.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-home mr-3"></i>
                        <span>首页</span>
                    </a>
                    <a href="profile.html" class="sidebar-item active flex items-center px-6 py-3 text-white hover:bg-gray-700">
                        <i class="fas fa-user mr-3"></i>
                        <span>个人资料</span>
                    </a>
                    <a href="family-tree.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-sitemap mr-3"></i>
                        <span>家谱编辑</span>
                    </a>
                    <a href="genealogy.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-project-diagram mr-3"></i>
                        <span>世系图生成</span>
                    </a>
                    <a href="social.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-comments mr-3"></i>
                        <span>家族社交圈</span>
                    </a>
                    <a href="events.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-calendar-alt mr-3"></i>
                        <span>家族活动</span>
                    </a>
                    <a href="stories.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-book-open mr-3"></i>
                        <span>家族故事与历史</span>
                    </a>
                    <a href="settings.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-cog mr-3"></i>
                        <span>设置</span>
                    </a>
                </nav>
            </div>
            <div class="mt-auto px-6 py-4">
                <div class="flex items-center">
                    <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                         class="w-10 h-10 rounded-full mr-3" alt="用户头像">
                    <div>
                        <p class="text-sm font-medium">张三</p>
                        <p class="text-xs text-gray-400">查看个人资料</p>
                    </div>
                </div>
            </div>
        </div>

        <!-- 主内容区 -->
        <div class="flex-1 overflow-auto">
            <div class="container mx-auto py-6 px-4">
                <!-- 个人资料头部 -->
                <div class="bg-white rounded-lg shadow-md overflow-hidden mb-6">
                    <div class="relative">
                        <!-- 封面图片 -->
                        <div class="h-48 bg-gradient-to-r from-blue-500 to-purple-600"></div>
                        
                        <!-- 头像和基本信息 -->
                        <div class="px-6 pb-5">
                            <div class="flex flex-col md:flex-row items-start md:items-end -mt-16">
                                <div class="relative">
                                    <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=150&q=80" 
                                         class="w-32 h-32 rounded-full border-4 border-white shadow-md" alt="用户头像">
                                    <button class="absolute bottom-0 right-0 bg-gray-800 text-white p-2 rounded-full hover:bg-gray-700">
                                        <i class="fas fa-camera"></i>
                                    </button>
                                </div>
                                <div class="mt-4 md:mt-0 md:ml-6 flex-1">
                                    <div class="flex flex-col md:flex-row md:items-center justify-between">
                                        <div>
                                            <h1 class="text-2xl font-bold text-gray-800">张三</h1>
                                            <p class="text-gray-600">家族成员 · 第四代</p>
                                        </div>
                                        <button class="mt-3 md:mt-0 bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md">
                                            <i class="fas fa-edit mr-2"></i>编辑资料
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 个人资料内容 -->
                <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                    <!-- 左侧：个人信息 -->
                    <div class="md:col-span-1">
                        <!-- 基本信息卡片 -->
                        <div class="bg-white rounded-lg shadow-md p-6 mb-6">
                            <h2 class="text-xl font-bold text-gray-800 mb-4">基本信息</h2>
                            <div class="space-y-4">
                                <div>
                                    <p class="text-sm text-gray-500">姓名</p>
                                    <p class="text-gray-800">张三</p>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">性别</p>
                                    <p class="text-gray-800">男</p>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">出生日期</p>
                                    <p class="text-gray-800">1985年6月15日</p>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">所在地</p>
                                    <p class="text-gray-800">上海市浦东新区</p>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">职业</p>
                                    <p class="text-gray-800">软件工程师</p>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">学历</p>
                                    <p class="text-gray-800">本科</p>
                                </div>
                            </div>
                        </div>

                        <!-- 联系方式卡片 -->
                        <div class="bg-white rounded-lg shadow-md p-6 mb-6">
                            <div class="flex justify-between items-center mb-4">
                                <h2 class="text-xl font-bold text-gray-800">联系方式</h2>
                                <div class="text-sm text-gray-500">
                                    <i class="fas fa-lock mr-1"></i>仅家族成员可见
                                </div>
                            </div>
                            <div class="space-y-4">
                                <div>
                                    <p class="text-sm text-gray-500">手机号码</p>
                                    <p class="text-gray-800">138****5678</p>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">电子邮箱</p>
                                    <p class="text-gray-800">zhangsan@example.com</p>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">微信</p>
                                    <p class="text-gray-800">zhangsan_wechat</p>
                                </div>
                            </div>
                        </div>

                        <!-- 家族关系卡片 -->
                        <div class="bg-white rounded-lg shadow-md p-6">
                            <h2 class="text-xl font-bold text-gray-800 mb-4">家族关系</h2>
                            <div class="space-y-4">
                                <div>
                                    <p class="text-sm text-gray-500">父亲</p>
                                    <div class="flex items-center mt-1">
                                        <img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-8 h-8 rounded-full mr-2" alt="父亲头像">
                                        <a href="#" class="text-blue-500 hover:underline">张大力</a>
                                    </div>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">母亲</p>
                                    <div class="flex items-center mt-1">
                                        <img src="https://images.unsplash.com/photo-1544005313-94ddf0286df2?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-8 h-8 rounded-full mr-2" alt="母亲头像">
                                        <a href="#" class="text-blue-500 hover:underline">李小花</a>
                                    </div>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">配偶</p>
                                    <div class="flex items-center mt-1">
                                        <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-8 h-8 rounded-full mr-2" alt="配偶头像">
                                        <a href="#" class="text-blue-500 hover:underline">王丽丽</a>
                                    </div>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">子女</p>
                                    <div class="flex items-center mt-1">
                                        <img src="https://images.unsplash.com/photo-1570295999919-56ceb5ecca61?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-8 h-8 rounded-full mr-2" alt="子女头像">
                                        <a href="#" class="text-blue-500 hover:underline">张小明</a>
                                    </div>
                                </div>
                                <div>
                                    <p class="text-sm text-gray-500">兄弟姐妹</p>
                                    <div class="flex items-center mt-1">
                                        <img src="https://images.unsplash.com/photo-1500648767791-00dcc994a43e?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-8 h-8 rounded-full mr-2" alt="兄弟姐妹头像">
                                        <a href="#" class="text-blue-500 hover:underline">张四</a>
                                    </div>
                                </div>
                            </div>
                            <button class="w-full mt-4 text-blue-500 hover:text-blue-600 text-center">
                                查看完整家族关系
                            </button>
                        </div>
                    </div>

                    <!-- 右侧：个人简介、动态和照片 -->
                    <div class="md:col-span-2">
                        <!-- 个人简介卡片 -->
                        <div class="bg-white rounded-lg shadow-md p-6 mb-6">
                            <h2 class="text-xl font-bold text-gray-800 mb-4">个人简介</h2>
                            <p class="text-gray-700">
                                大家好，我是张三，目前在一家互联网公司担任软件工程师。我出生于1985年，是家族的第四代成员。我喜欢摄影、旅行和收集家族老照片，希望能够通过这个平台更好地了解家族历史，与家人保持联系。
                            </p>
                            <div class="mt-4 flex flex-wrap gap-2">
                                <span class="bg-blue-100 text-blue-800 text-xs px-3 py-1 rounded-full">摄影爱好者</span>
                                <span class="bg-green-100 text-green-800 text-xs px-3 py-1 rounded-full">旅行达人</span>
                                <span class="bg-purple-100 text-purple-800 text-xs px-3 py-1 rounded-full">家族历史收藏家</span>
                                <span class="bg-yellow-100 text-yellow-800 text-xs px-3 py-1 rounded-full">软件工程师</span>
                            </div>
                        </div>

                        <!-- 个人动态卡片 -->
                        <div class="bg-white rounded-lg shadow-md p-6 mb-6">
                            <div class="flex justify-between items-center mb-4">
                                <h2 class="text-xl font-bold text-gray-800">最近动态</h2>
                                <a href="social.html" class="text-blue-500 hover:text-blue-600">查看全部</a>
                            </div>
                            
                            <div class="space-y-6">
                                <!-- 动态1 -->
                                <div class="border-b border-gray-100 pb-6">
                                    <div class="flex justify-between items-start">
                                        <p class="text-gray-800">分享了一张老照片，这是我爷爷年轻时的照片，拍摄于1960年代。</p>
                                        <span class="text-sm text-gray-500">3天前</span>
                                    </div>
                                    <div class="mt-3">
                                        <img src="https://images.unsplash.com/photo-1552058544-f2b08422138a?ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=80" 
                                             class="rounded-lg w-full max-h-64 object-cover" alt="老照片">
                                    </div>
                                    <div class="mt-3 flex items-center space-x-4">
                                        <button class="flex items-center text-gray-500 hover:text-blue-500">
                                            <i class="far fa-heart mr-1"></i>
                                            <span>18</span>
                                        </button>
                                        <button class="flex items-center text-gray-500 hover:text-blue-500">
                                            <i class="far fa-comment mr-1"></i>
                                            <span>6</span>
                                        </button>
                                    </div>
                                </div>
                                
                                <!-- 动态2 -->
                                <div>
                                    <div class="flex justify-between items-start">
                                        <p class="text-gray-800">期待下个月的家族聚会，已经准备好了一些有趣的家族游戏和活动！</p>
                                        <span class="text-sm text-gray-500">1周前</span>
                                    </div>
                                    <div class="mt-3 flex items-center space-x-4">
                                        <button class="flex items-center text-gray-500 hover:text-blue-500">
                                            <i class="far fa-heart mr-1"></i>
                                            <span>24</span>
                                        </button>
                                        <button class="flex items-center text-gray-500 hover:text-blue-500">
                                            <i class="far fa-comment mr-1"></i>
                                            <span>12</span>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 照片墙卡片 -->
                        <div class="bg-white rounded-lg shadow-md p-6">
                            <div class="flex justify-between items-center mb-4">
                                <h2 class="text-xl font-bold text-gray-800">照片墙</h2>
                                <button class="text-blue-500 hover:text-blue-600">查看全部</button>
                            </div>
                            <div class="grid grid-cols-3 gap-3">
                                <img src="https://images.unsplash.com/photo-1529156069898-49953e39b3ac?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80" 
                                     class="w-full h-24 object-cover rounded-lg" alt="照片1">
                                <img src="https://images.unsplash.com/photo-1517457373958-b7bdd4587205?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80" 
                                     class="w-full h-24 object-cover rounded-lg" alt="照片2">
                                <img src="https://images.unsplash.com/photo-1529626455594-4ff0802cfb7e?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80" 
                                     class="w-full h-24 object-cover rounded-lg" alt="照片3">
                                <img src="https://images.unsplash.com/photo-1484712401471-05c7215830eb?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80" 
                                     class="w-full h-24 object-cover rounded-lg" alt="照片4">
                                <img src="https://images.unsplash.com/photo-1516478177764-9fe5bd7e9717?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80" 
                                     class="w-full h-24 object-cover rounded-lg" alt="照片5">
                                <img src="https://images.unsplash.com/photo-1551963831-b3b1ca40c98e?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80" 
                                     class="w-full h-24 object-cover rounded-lg" alt="照片6">
                            </div>
                            <button class="w-full mt-4 bg-gray-100 hover:bg-gray-200 text-gray-800 py-2 rounded-md">
                                <i class="fas fa-plus mr-2"></i>上传照片
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 移动端菜单切换
        document.getElementById('menu-toggle').addEventListener('click', function() {
            document.getElementById('sidebar').classList.toggle('show');
        });

        // 点击页面其他区域关闭菜单
        document.addEventListener('click', function(event) {
            const sidebar = document.getElementById('sidebar');
            const menuToggle = document.getElementById('menu-toggle');
            
            if (sidebar.classList.contains('show') && 
                !sidebar.contains(event.target) && 
                event.target !== menuToggle) {
                sidebar.classList.remove('show');
            }
        });
    </script>
</body>
</html> 